package com.hdp.jsdiary;

import android.app.Activity;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.os.Bundle;
import android.view.Window;
import android.view.View;
import android.widget.Button;

public class GuideActivity extends Activity {

	private Button guideButton = null;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		this.requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.guide_activity);
		
		guideButton = (Button) findViewById(R.id.guide_btn);
		guideButton.setOnClickListener(new ButtonListener());
	}
	
	public class ButtonListener implements android.view.View.OnClickListener {
		
		@Override
		public void onClick(View v) {
			// TODO Auto-generated method stub
			SharedPreferences preferences = getSharedPreferences("first_pref", MODE_PRIVATE);
			Editor editor = preferences.edit();
			editor.putBoolean("isFirstIn", false);
			editor.commit();
			
			Intent intent = new Intent(GuideActivity.this, JsDiary.class);
			startActivity(intent);
			GuideActivity.this.finish();
		}
	
	}
}
